#pragma once
#include <exception>
#include <cstring>
#include <cerrno>

class general_err : public std::exception
{
public:
    general_err(const char* err_str)
        : std::exception()
        , _err_str(err_str)
    {}

    const char* what() const noexcept override
    {
        return _err_str;
    }
private:
    const char* _err_str;
};